package com.example.spring.code.a09;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan("com.example.spring.code.a09")
public class A09 {

    private static final Logger log = LoggerFactory.getLogger(A09.class);

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(A09.class);

        E e = context.getBean(E.class);
        log.info("{}", e.getF1().getClass());
        log.info("{}", e.getF1());
        log.info("{}", e.getF1());
        log.info("{}", e.getF1());

        log.info("{}", e.getF2().getClass());
        log.info("{}", e.getF2());
        log.info("{}", e.getF2());
        log.info("{}", e.getF2());

        log.info("{}", e.getF3().getClass());
        log.info("{}", e.getF3());
        log.info("{}", e.getF3());
        log.info("{}", e.getF3());

        log.info("{}", e.getF4().getClass());
        log.info("{}", e.getF4());
        log.info("{}", e.getF4());
        log.info("{}", e.getF4());
    }

}
